package com.yanqu.road.server.cmd.estatewar.activity.cross;

import com.yanqu.road.pb.estatewar.EstateWarProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.palace.PalaceModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_PALACE_WORSHIP_CROSS_RESP, desc = "皇宫膜拜")
public class CrossPalaceWorshipResponseCmd extends AbstractCommand {
    private EstateWarProto.PalaceWorshipRespMsg reqMsg;
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = EstateWarProto.PalaceWorshipRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        player.sendPacket(Protocol.U_PALACE_WORSHIP, player.getModule(PalaceModule.class).worshipResponse(reqMsg));
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
